

#ifndef POLYGONRT_H
#define POLYGONRT_H
//namespace polygonRT
//#include "ray.h"

#include <Windows.h>

typedef size_t scene_handle;

#define DLL_EXPORTED(RET_TY) extern "C" __declspec(dllexport) RET_TY WINAPI



//DLL_EXPORTED(int) Tfoo(int a);
DLL_EXPORTED(scene_handle) RTcreateScene(char file[]);
DLL_EXPORTED(void) RTfreeScene(scene_handle hnd);

DLL_EXPORTED(void) RTsetDim(scene_handle, int width, int height);
DLL_EXPORTED(void) RTsetCam(scene_handle scene, 
							double cx,double cy,double cz,
							double dx,double dy,double dz);
DLL_EXPORTED(void) RTsetExposition(scene_handle hnd, float ex);


DLL_EXPORTED(int) RTshootImage(scene_handle scene, bool fast);
DLL_EXPORTED(void) RTgetImg(scene_handle hnd, unsigned int* img);

DLL_EXPORTED(int) RTsetInt(scene_handle hnd, char* name, int value);
DLL_EXPORTED(int) RTsetString(scene_handle hnd, char* name, char* value);
DLL_EXPORTED(int) RTsetFloat(scene_handle hnd, char* name, float value);
DLL_EXPORTED(int) RTsetBool(scene_handle hnd, char* name, bool value);

typedef void (*property_announcer)(const char*,int,const char*); //function to announce property to the user application
DLL_EXPORTED(void) RTannounceProperties(scene_handle hnd, property_announcer announcer);

DLL_EXPORTED(void) RTgetResolution(scene_handle hnd, int* arr);

DLL_EXPORTED(void) RTcameraDirDelta(scene_handle hnd, float dx, float dy, float* newdir);
DLL_EXPORTED(void) RTcameraPosDelta(scene_handle hnd, float dx, float dy, float dz, float* newpos);

DLL_EXPORTED(int)  RTsaveImage(scene_handle hnd, char *filename);
DLL_EXPORTED(void) RTonscreenMaterialName(scene_handle hnd, int x, int y, char** s);
#endif